<template>
  <div v-if="ticket.status===0" class="ticket-item">
    <div class="item-tit-box cenLeft">
      <div class="item-title">
        {{ ticket.tname }}
      </div>
      <div style="margin-right:6px" :style="[{color:$store.state.themeColor}]" class="item-price">
        ¥{{ ticket.eprice }}
      </div>
      <div class="item-date">
        {{ $moment($yunQiTicketDataStime(Number(ticket.ticketId))||ticket.stime).utcOffset(480).format('MM月DD日') }}- {{ $moment($yunQiTicketDataEtime(Number(ticket.ticketId))||ticket.etime).utcOffset(480).format('MM月DD日') }} {{$yunQiTicketTime(ticket.ticketId)||ticket.tTypeDate}}
      </div>
    </div>
    <div class="item-equity">
      <div v-for="(it,ind) of initDetail(ticket.detail)" :key="ind" class="equity">
        <span class="equity-logo cenCeb">
          -
        </span>
        {{ it }}
      </div>
    </div>
    <div class="authentication cenLeft">
      实名制电⼦票 (人脸识别入场)
    </div>
  </div>
</template>
<script>
export default {
  props: ["ticket"],
  methods: {
    initDetail(detail) {
      if (!detail) {
        let arr = [];
        return arr;
      }
      return JSON.parse(detail);
    }
  }
};
</script>

<style scoped>
.ticket-item {
  width: 100%;
  height: auto;
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(61, 61, 61, 0.8);
  border-radius: 6px;
  padding: 18px;
  margin-bottom: 16px;
}
.item-tit-box {
  width: 100%;
  height: auto;
  flex-wrap: wrap;
}
.item-tit-box > div {
  width: auto;
  height: auto;
  margin-right: 9px;
}
.item-title {
  /* font-family: PingFangSC-Medium; */
  font-size: 28px;
  color: #ffffff;
}
.item-price {
  /* font-family: PingFangSC-Medium; */
  font-size: 28px;
}
.item-date {
  opacity: 0.4;
  /* font-family: PingFangSC-Regular; */
  font-size: 22px;
  color: #eeeeee;
}
.item-equity {
  width: 100%;
  height: auto;
  padding: 14px 0px 12px 0px;
}
.equity {
  opacity: 0.7;
  /* font-family: PingFangSC-Regular; */
  font-size: 22px;
  color: #eeeeee;
  text-align: left;
  position: relative;
  padding-left: 18px;
  line-height: 32px;
}
.equity-logo {
  opacity: 0.7;
  /* font-family: PingFangSC-Regular; */
  font-size: 20px;
  color: #eeeeee;
  text-align: left;
  position: absolute;
  left: 0px;
  top: 0px;
  width: auto;
  height: 100%;
}
.authentication {
  width: 100%;
  height: auto;
  /* opacity: 0.7; */
  /* font-family: PingFangSC-Regular; */
  font-size: 22px;
  color: #ffffff;
  border-top: 1px solid #38393b;
  padding-top: 16px;
  margin-top: 6px;
  text-align: left;
}
</style>
